package com.saikei.statstitlebar;

import android.graphics.Bitmap;

/**
 * @Author:gewu
 * @Time:2022/10/3003:02
 * @Description:代表的是右上角的每个item
 */
public class BarItem {

    private final BarType barType;

    private String text = "";

    private int icon;

    private Bitmap bitmap;

    private BarTextView barTextView;

    private BarImageView barImageView;

    public BarTextView getBarTextView() {
        return barTextView;
    }

    public void setBarTextView(BarTextView barTextView) {
        this.barTextView = barTextView;
    }

    public BarImageView getBarImageView() {
        return barImageView;
    }

    public void setBarImageView(BarImageView barImageView) {
        this.barImageView = barImageView;
    }

    public BarItem(String text) {
        this.text = text;
        this.barType = BarType.TEXT;
    }

    public BarItem(int icon) {
        this.barType = BarType.ICON;
        this.icon = icon;
    }

    public BarItem(Bitmap bitmap) {
        this.barType = BarType.BITMAP;
        this.bitmap = bitmap;
    }

    public BarType getBarType() {
        return barType;
    }

    public String getText() {
        return text;
    }

    public int getIcon() {
        return icon;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }
}
